package de.carcophan.jimdb.gwt.shared.entites;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;

/**
 * Entity implementation class for Entity: Movie
 * 
 */

@Entity
@Table(uniqueConstraints=@UniqueConstraint(columnNames={"imdbId"}))
public class Movie implements Serializable {

   private static final long serialVersionUID = 1L;

   @Id
   @GeneratedValue(strategy = GenerationType.AUTO)
   private int id;

   private String title;

   @Column(unique=true)
   private String imdbId;
   @Version
   private int version;

   private String rated;

   private String poster;
   @Column(length=1024)
   private String actors;

   private String alsoKnownAs;

   private String country;

   private String directors;

   private String filmingLocations;

   private String genres;

   private String imdbUrl;

   @Column(length=2048)
   private String plotSimple;

   private Double rating;

   private Integer ratingCount;

   private Integer releaseDate;

   private String runtime;

   private String type;

   private String writers;

   private Integer year;

   public int getVersion() {
      return version;
   }

   public void setVersion(int version) {
      this.version = version;
   }

   public int getId() {
      return id;
   }

   public void setId(int id) {
      this.id = id;
   }

   public String getTitle() {
      return title;
   }

   public void setTitle(String title) {
      this.title = title;
   }

   @Override
   public String toString() {
      StringBuilder builder = new StringBuilder();
      builder.append("Movie [id=");
      builder.append(id);
      builder.append(", title=");
      builder.append(title);
      builder.append(", imdbId=");
      builder.append(imdbId);
      builder.append("]");
      return builder.toString();
   }

   public void setRated(String rated) {
      this.rated = rated;
   }

   public String getRated() {
      return rated;
   }

   public void setPoster(String poster) {
      this.poster = poster;
   }

   public String getPoster() {
      return poster;
   }

   public void setActors(String actors) {
      this.actors = actors;
   }

   public String getActors() {
      return actors;
   }

   public void setAlsoKnownAs(String alsoKnownAs) {
      this.alsoKnownAs = alsoKnownAs;
   }

   public String getAlsoKnownAs() {
      return alsoKnownAs;
   }

   public void setCountry(String country) {
      this.country = country;
   }

   public String getCountry() {
      return country;
   }

   public void setDirectors(String directors) {
      this.directors = directors;
   }

   public void setFilmingLocations(String filmingLocations) {
      this.filmingLocations = filmingLocations;
   }

   public void setGenres(String genres) {
      this.genres = genres;
   }

   public void setImdbUrl(String imdbUrl) {
      this.imdbUrl = imdbUrl;
   }

   public void setLanguage(String listToString) {
   }

   public void setPlotSimple(String plotSimple) {
      this.plotSimple = plotSimple;
   }

   public void setRating(Double rating) {
      this.rating = rating;
   }

   public void setRatingCount(Integer ratingCount) {
      this.ratingCount = ratingCount;
   }

   public void setReleaseDate(Integer releaseDate) {
      this.releaseDate = releaseDate;
   }

   public String getImdbId() {
      return imdbId;
   }

   public void setImdbId(String imdbId) {
      this.imdbId = imdbId;
   }

   public String getDirectors() {
      return directors;
   }

   public String getFilmingLocations() {
      return filmingLocations;
   }

   public String getGenres() {
      return genres;
   }

   public String getImdbUrl() {
      return imdbUrl;
   }

   public String getPlotSimple() {
      return plotSimple;
   }

   public Double getRating() {
      return rating;
   }

   public Integer getRatingCount() {
      return ratingCount;
   }

   public Integer getReleaseDate() {
      return releaseDate;
   }

   public String getRuntime() {
      return runtime;
   }

   public String getType() {
      return type;
   }

   public String getWriters() {
      return writers;
   }

   public Integer getYear() {
      return year;
   }

   public void setRuntime(String runtime) {
      this.runtime = runtime;
   }

   public void setType(String type) {
      this.type = type;
   }

   public void setWriters(String writers) {
      this.writers = writers;
   }

   public void setYear(Integer year) {
      this.year = year;
   }

}
